package com.zhht.checkcop.exception;

import java.util.HashMap;
import java.util.Map;

/**
 * Project: COP
 * <p/>
 * Title: ValidationException
 * <p/>
 * Description://校验异常
 * <p/>
 * Date: 
 */
public class ValidationException extends RuntimeException {

    public static final Integer EMPTY = 1;
    private static Map zhParamName = new HashMap();

    {
        zhParamName.put("", "");
    }
    private String paraName;
    private Integer type; // 异常类型， 1，代表空参数
    private String paraChineseName;
    private String prompt; // 异常显示

    public ValidationException() {
        super();
    }

    public ValidationException(String message, Throwable throwable) {
        super(message, throwable);
    }

    public ValidationException(String prompt) {
        super("");
        this.prompt = prompt;
    }

    public ValidationException(Throwable throwable) {
        super(throwable);
    }

    public ValidationException(String message, String paraName, Integer type, String paraChineseName, String prompt){
        super(message);
        this.paraName = paraName;
        this.type = type;
        this.paraChineseName = paraChineseName;
        this.prompt = prompt;
    }

    public ValidationException(String paraName, Integer type, String paraChineseName, String prompt){
        super("");
        this.paraName = paraName;
        this.type = type;
        this.paraChineseName = paraChineseName;
        this.prompt = prompt;
    }

    public ValidationException(String paraName, Integer type, String paraChineseName){
        super("");
        this.paraName = paraName;
        this.type = type;
        this.paraChineseName = paraChineseName;
    }

    public ValidationException(String paraName, String paraChineseName){
        super("");
        this.paraName = paraName;
        this.type = EMPTY;
        this.paraChineseName = paraChineseName;
    }

    public String getParaName() {
        return paraName;
    }

    public void setParaName(String paraName) {
        this.paraName = paraName;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getParaChineseName() {
        return paraChineseName;
    }

    public void setParaChineseName(String paraChineseName) {
        this.paraChineseName = paraChineseName;
    }

    public String getPrompt() {
        return prompt;
    }

    public void setPrompt(String prompt) {
        this.prompt = prompt;
    }
}
